﻿using System;
using System.Web.Mvc;

namespace SimpleForum.Utils
{
    public static class NotificationHelper
    {
        public enum NotificationTypes
        {
            Attention, Information, Success, Error
        }

        public static MvcHtmlString Notification(this HtmlHelper Html, NotificationTypes Type, string Message)
        {
            TagBuilder Notification = new TagBuilder("div");
            Notification.AddCssClass("notification");
            Notification.AddCssClass(Type.ToString().ToLower());

            TagBuilder InnerMessage = new TagBuilder("div");
            InnerMessage.InnerHtml = Message;

            Notification.InnerHtml = InnerMessage.ToString();

            return MvcHtmlString.Create(Notification.ToString());
        }
    }
}